﻿using System;
using System.IO;
using UnityEngine;

namespace Character
{
	// Token: 0x020001A8 RID: 424
	public abstract class ParameterBase
	{
		// Token: 0x06000AEA RID: 2794 RVA: 0x0003EF60 File Offset: 0x0003D160
		protected ParameterBase(SEX sex)
		{
			this.sex = sex;
		}

		// Token: 0x17000160 RID: 352
		// (get) Token: 0x06000AEB RID: 2795 RVA: 0x0003EF70 File Offset: 0x0003D170
		public SEX Sex
		{
			get
			{
				return this.sex;
			}
		}

		// Token: 0x06000AEC RID: 2796 RVA: 0x0003EF78 File Offset: 0x0003D178
		protected void Write(BinaryWriter writer, int val)
		{
			writer.Write(val);
		}

		// Token: 0x06000AED RID: 2797 RVA: 0x0003EF84 File Offset: 0x0003D184
		protected void Read(BinaryReader reader, ref int val)
		{
			val = reader.ReadInt32();
		}

		// Token: 0x06000AEE RID: 2798 RVA: 0x0003EF90 File Offset: 0x0003D190
		protected void Write(BinaryWriter writer, float val)
		{
			writer.Write(val);
		}

		// Token: 0x06000AEF RID: 2799 RVA: 0x0003EF9C File Offset: 0x0003D19C
		protected void Read(BinaryReader reader, ref float val)
		{
			val = reader.ReadSingle();
		}

		// Token: 0x06000AF0 RID: 2800 RVA: 0x0003EFA8 File Offset: 0x0003D1A8
		protected void Write(BinaryWriter writer, bool val)
		{
			writer.Write(val);
		}

		// Token: 0x06000AF1 RID: 2801 RVA: 0x0003EFB4 File Offset: 0x0003D1B4
		protected void Read(BinaryReader reader, ref bool val)
		{
			val = reader.ReadBoolean();
		}

		// Token: 0x06000AF2 RID: 2802 RVA: 0x0003EFC0 File Offset: 0x0003D1C0
		protected void Write(BinaryWriter writer, Color color)
		{
			writer.Write(color.r);
			writer.Write(color.g);
			writer.Write(color.b);
			writer.Write(color.a);
		}

		// Token: 0x06000AF3 RID: 2803 RVA: 0x0003EFF8 File Offset: 0x0003D1F8
		protected void Read(BinaryReader reader, ref Color color)
		{
			color.r = reader.ReadSingle();
			color.g = reader.ReadSingle();
			color.b = reader.ReadSingle();
			color.a = reader.ReadSingle();
		}

		// Token: 0x06000AF4 RID: 2804 RVA: 0x0003F02C File Offset: 0x0003D22C
		protected void Write(BinaryWriter writer, Vector3 vec)
		{
			writer.Write(vec.x);
			writer.Write(vec.y);
			writer.Write(vec.z);
		}

		// Token: 0x06000AF5 RID: 2805 RVA: 0x0003F058 File Offset: 0x0003D258
		protected void Read(BinaryReader reader, ref Vector3 vec)
		{
			vec.x = reader.ReadSingle();
			vec.y = reader.ReadSingle();
			vec.z = reader.ReadSingle();
		}

		// Token: 0x06000AF6 RID: 2806 RVA: 0x0003F080 File Offset: 0x0003D280
		protected void Write(BinaryWriter writer, float[] vals)
		{
			writer.Write(vals.Length);
			for (int i = 0; i < vals.Length; i++)
			{
				this.Write(writer, vals[i]);
			}
		}

		// Token: 0x06000AF7 RID: 2807 RVA: 0x0003F0B4 File Offset: 0x0003D2B4
		protected void Read(BinaryReader reader, ref float[] vals)
		{
			int num = reader.ReadInt32();
			vals = new float[num];
			for (int i = 0; i < vals.Length; i++)
			{
				vals[i] = reader.ReadSingle();
			}
		}

		// Token: 0x04000B4D RID: 2893
		protected SEX sex;
	}
}
